package com.zjl.media.core;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author linfuxin Created on 2022-03-18 09:19:12
 */
@AllArgsConstructor
@Getter
public enum TransferEnum {
    SOFT_JAVACV(false, true),
    SOFT_FFMPEG(false, false),
    HARD_FFMPEG(true, false),

    ;
    private boolean hard;
    private boolean javacv;

    public static TransferEnum getInstance(boolean hard, boolean javacv) {
        for (TransferEnum item : values()) {
            if (item.hard == hard && item.javacv == javacv) {
                return item;
            }
        }
        return null;
    }
}
